<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">

		<title>查询行驶证</title>
		<!-- Bootstrap core CSS -->
		<link href="asserts/css/bootstrap.min.css" rel="stylesheet">

		<!-- Custom styles for this template -->
		<link href="asserts/css/dashboard.css" rel="stylesheet">

	</head>

	<body>

	<div th:insert="common/bar::top"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:insert="common/bar::#left"></div>
				<main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
					<div class="table-responsive">
						<form id="myForm">
							<div class="form-group">
								<label>电动车牌照</label>
								<input name="ebickID" type="text" class="form-control" placeholder="">
							</div>

						</form>
						<button type="submit" class="btn btn-primary" onclick="find()">查询</button>
					</div>
				</main>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script type="text/javascript" src="asserts/js/jquery-3.2.1.slim.min.js"></script>
		<script type="text/javascript" src="asserts/js/popper.min.js"></script>
		<script type="text/javascript" src="asserts/js/bootstrap.min.js"></script>

		<!-- Icons -->
		<script type="text/javascript" src="asserts/js/feather.min.js"></script>

		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script>
			function verifyLoginStatus() {
				//验证登录状态
				console.log("1");
				var message = document.getElementById("mystatus").innerText;
				console.log(message);
				if(message == '请先登录'){
					alert("请登录");
					location.href="login";
					return '1';
				}
				return '2';
			}

			function find(){
				var status = verifyLoginStatus();

				if(status == '2'){
					var form = new FormData(document.getElementById("myForm"));
					$.ajax({
						url:"superviserFindDrivingLicense.do",
						type:"post",
						dataType:"html",
						data:form,
						cache:false,
						processData:false,
						contentType:false,
						success: function (data) {
							console.log("success");
							location.href="showDrivingLicenseToSuperviser";
						},
						error:function (data) {
							console.log("error");
						}
					})
				}
			}
		</script>


	</body>

</html>